<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>插槽的引入</title>
</head>
<body>
<div id="app">
    <cpn v-show="show"></cpn>
    <h2 style="display: none">Hello， World</h2>
    <cpn><div>Hello， World!</div></cpn>
</div>

<template id="cpn">
    <h2>能够在浏览器中显示？</h2>
</template>

<script type="module">
    import {createApp, ref} from "../../../../js/vue.esm-browser.js";
    import {defineComponent} from "../../../../js/vue.esm-browser.js";

    let cpn = defineComponent(
        {
            template: "#cpn",
            setup() {
                let isShow = ref(true)

                isShow.value = false
                return {
                    isShow,
                };
            }
        }
    );

    let app = createApp({
        setup() {
            let show = ref(false)
            return {
                show,
            }
        },
        components: {
            cpn,
        }
    })

    app.mount("#app")
</script>
</body>
</html>